Skip to content

Taxonomy depth and autofocus fix#2976

Closed
jesperhodge wants to merge 8 commits intoopenedx:masterfrom
jesperhodge:jhodge/taxonomy-depth-and-autofocus-fix
Closed

Taxonomy depth and autofocus fix#2976
jesperhodge wants to merge 8 commits intoopenedx:masterfrom
jesperhodge:jhodge/taxonomy-depth-and-autofocus-fix

Conversation

@jesperhodge
Copy link
Copy Markdown
Contributor

Description

Note on unit testing

I have decided against additional unit tests because:

  • The constant is designed to be adjustable, I don't think we need to expect it to be a specific value
  • The autofocus bug was due to an unfortunate last-minute addition by copilot, which slipped through my review. Since it's a random line of code that I don't expect to resurface, I don't see any danger of regression that we should test against.

I have no strong opinion on this whatsoever. If you want tests, let me know and I'll write tests.

Testing instructions

  • Go to a taxonomy

  • Create nested subtags 6 levels deep (count from top to innermost tag - sum should be 6 levels)

  • You should not encounter an error

  • All levels should have an expand/collapse icon and a menu with Add Subtag and Rename actions

  • Only on the innermost level (that should be the 6th level) the Add Subtag action should be disabled

  • Reload page

  • New tags now appear alphabetically ordered (they have been refreshed from server)

  • You should see all 6 levels on expanding them

  • Innermost level (6th level) should have the Add Subtag action disabled and should not have a collapse/expand icon

  • Create any new tag

  • Autofocus should automatically move the cursor to the input field

  • type in any single character

  • that character should not be highlighted

  • type in more characters

  • since the first character was not highlighted, new character should not overwrite previous one

Best Practices Checklist

We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:

  • Any new files are using TypeScript (.ts, .tsx).
  • Avoid propTypes and defaultProps in any new or modified code.
  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)
  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.
  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.
  • All new i18n messages in messages.ts files have a description for translators to use.
  • Avoid using ../ in import paths. To import from parent folders, use @src, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

@openedx-webhooks
Copy link
Copy Markdown

Thanks for the pull request, @jesperhodge!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 1, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Apr 1, 2026
@jesperhodge jesperhodge closed this Apr 1, 2026
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions Apr 1, 2026
@jesperhodge
Copy link
Copy Markdown
Contributor Author

Reason for closing:
Duplicate

@jesperhodge jesperhodge deleted the jhodge/taxonomy-depth-and-autofocus-fix branch April 1, 2026 22:56
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 99.13793% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.56%. Comparing base (16d1903) to head (0ae30ac).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/taxonomy/tag-list/hooks.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2976      +/-   ##
==========================================
- Coverage   95.56%   95.56%   -0.01%     
==========================================
  Files        1349     1349              
  Lines       31159    31234      +75     
  Branches     6833     6853      +20     
==========================================
+ Hits        29777    29848      +71     
- Misses       1332     1336       +4     
  Partials       50       50              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Frontend max taxonomy depth should match backend Fix create tag autofocus

3 participants